<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/Function Info.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>WinXToolbar_AddToggleButton</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style3 {font-size: medium}
-->
</style>

<link href="../../WinXStyles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	font-size: x-large;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style2 {
	font-size: large;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style>
</head>

<body>
<h1 class="style1"><img src="../../WinX48.png" width="48" height="48" align="absmiddle"> <!-- InstanceBeginEditable name="title" -->WinXToolbar_AddToggleButton<!-- InstanceEndEditable --></h1>
<hr>

<!-- InstanceBeginEditable name="Prototype" -->
<p>WinXToolbar_AddToggleButton (hToolbar, commandId, iImage, STRING tooltipText, mutex, optional, moveable)</p>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="Description" -->
<p>Adds a toggle button to a toolbar </p>
<!-- InstanceEndEditable -->
<table width="80%" border="1" cellpadding="0" cellspacing="0">
  <tr bgcolor="#CCCCCC">
    <th width="24%"><span class="style3">Parameter</span></th>
    <th width="76%"><span class="style3">Description</span></th>
  </tr>
  <!-- InstanceBeginRepeat name="Parameter Table" --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->hToolbar<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The handle to the toolbar to add the toggle button to <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->commandId<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The unique identifier to associate with this toggle button. When the button is clicked, the onCommand callback is invoked (assuming it has been registered) with the id parameter set to this value.<!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->iImage<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The 0 based index of the image to use for this toggle button <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->STRING tooltipText <!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The text for the tooltip <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->mutex<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->$$TRUE if this is part of a group of mutually exclusive toggle buttons. If a group of toggle buttons is mutually exclusive, only one can be selected at any time. Use seperators to seperate groups of mutually exclusive toggle buttons <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->optional<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->NOT IMPLEMENTED, SET TO $$FALSE <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->moveable<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->NOT IMPLEMENTED, SET TO $$FALSE <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat -->
</table>
<h3>Returns</h3>
<!-- InstanceBeginEditable name="Return Info" -->
<p>$$TRUE on success or $$FALSE on fail </p>
<!-- InstanceEndEditable -->
<h3>Remarks</h3>
<!-- InstanceBeginEditable name="Remarks" -->
<p>The toolbar displays buttons in the order they are added. </p>
<p>The iImage parameter is a 0 based index to the button image. If you created the toolbar with <a href="WinXNewToolbar.htm">WinXNewToolbarUsingIls</a>, this is the index into the image list. If you created the toolbar with <a href="WinXNewToolbar.htm">WinXNewToolbar</a> this is the index of the image in the bitmap specified in the hBmpButtons parameter. The button images are arranged in a row in that bitmap, the first is button 0, the next button 1 etc.</p>
<p>Tooltips are strictly one line only, don't make them too long.</p>
<!-- InstanceEndEditable -->
<h3>Examples</h3>
<table width="80%"  border="0">
  <tr>
    <td bgcolor="#C6C6FF"><!-- InstanceBeginEditable name="Example Code" -->
      <p class="codeStyle">'define constants <br>
      $$ID_TOGGLE = 100 </p>
      <p class="codeStyle">'add a toggle button<br>
        WinXToolbar_AddToggleButton (hToolbar, $$ID_TOGGLE, 0, &quot;This is a toggle button&quot;, $$FALSE, $$FALSE, $$FALSE)</p>
    <!-- InstanceEndEditable --></td>
  </tr>
</table>

<h2 class="style2">Related Links</h2>
<!-- InstanceBeginEditable name="Related Links" -->
<p><a href="WinXNewToolbar.htm">WinXNewToolbar</a><br>
  <a href="WinXNewToolbarUsingIls.htm">WinXNewToolbarUsingIls</a><br>
  <a href="WinXToolbar_AddButton.htm">WinXToolbar_AddButton</a><br>
  <a href="WinXToolbar_AddSeperator.htm">WinXToolbar_AddSeperator</a><br>
<a href="WinXToolbar_AddControl.htm">WinXToolbar_AddControl</a></p>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
